package com.cms.service.impl;

import java.io.Serializable;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cms.dao.TopicDao;
import com.cms.entity.Topic;
import com.cms.service.TopicService;


@Service(value="topicService")
public class TopicServiceImpl implements TopicService {
	
	private TopicDao topicDao;
	

	public Topic get(Serializable id) {
		return topicDao.find(id, Topic.class);
	}

	public void delete(Serializable id) {
		topicDao.delete(id, Topic.class);
	}

	public void save(Topic entity) {
		topicDao.save(entity);
	}

	public void update(Topic entity) {
		topicDao.update(entity);
	}


	public List<Topic> queryTopics(Topic topic){
		return topicDao.queryTopics(topic);
	}
	
	
	
	public TopicDao getTopicDao() {
		return topicDao;
	}
	@Autowired
	public void setTopicDao(TopicDao topicDao) {
		this.topicDao = topicDao;
	}
	
	
}
